package com.huangwei.controller;

import com.huangwei.model.Banner;
import com.huangwei.service.BannerService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping(value = "/banner")
public class BannerController {
    @Resource
    private BannerService bannerService;

    @GetMapping("/getAllBanners")
    public List<Banner> getAllBanners() {
        List<Banner> bannerList = bannerService.getAllBanners();
        return bannerList;
    }
}
